{extend name="public/father" /}

{block name='main'}

<div class="layui-card">
    <div class="layui-card-body">
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title">
                <li class="layui-this"><i class="layui-icon layui-icon-video"></i> 短视频管理</li>
            </ul>
            <div class="layui-tab-content">

                <blockquote class="layui-elem-quote layui-quote-nm">
                    <p>标题中可以加入{city} 代表所在城市，{emoji} 代表随机表情</p>
                </blockquote>

                <div class="layui-btn-container">
                    <button class="layui-btn" onclick="openUrl('添加', 'create', 800);return false;"><i class="layui-icon layui-icon-addition"></i>添加</button>
                    <button class="layui-btn layui-btn-danger" onclick="openUrl('分享设置', '{:url(\'admin/config/set\')}?group=qun', 800);return false;"><i class="layui-icon layui-icon-set"></i>分享设置</button>
                    <button class="layui-btn layui-btn-primary" onclick="javascript:location.reload();"><i class="layui-icon layui-icon-ok-circle"></i> 刷新</button>
                </div>

                <table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>

                <script type="text/html" id="status">
                    {{ d.status==1 ? '已启用' : '<span style="color: orange;">已禁用</span>' }}
                </script>

                <script type="text/html" id="vpic">
                    <img onclick="showImg(this.src);" src="{{ d.vpic }}" style="max-width: 100%;" alt="">
                </script>

                <script type="text/html" id="rukou">
                    <div class="layui-btn-group">
                        <a class="layui-btn layui-btn-sm layui-btn-primary" href="{:fission('https')}://{{d.domain}}/zhnw/{{ d.alias }}.html" target="_blank"><i class="layui-icon layui-icon-link"></i>打开</a>
                        <a class="layui-btn layui-btn-sm layui-btn-primary" onclick="showImg('https://minico.qq.com/qrcode/get?type=2&r=2&size=200&text={:fission(\'https\')}://{{d.domain}}/zhnw/{{ d.alias }}.html')"><i class="layui-icon layui-icon-chart"></i>二维码</a>
                        <a class="layui-btn layui-btn-sm layui-btn-primary" onclick="layer.alert('{:fission(\'https\')}://{{d.domain}}/zhnw/{{ d.alias }}.html', {title: false,shade: 0.5,closeBtn: 1,shadeClose: true,anim: 3,btn:false});"><i class="layui-icon layui-icon-search"></i>网址</a>
                    </div>
                </script>

                <script type="text/html" id="barDemo">
                    <div class="layui-btn-group">
                        <a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>修改</a>
                        <a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="del" data-table="dsps"><i class="layui-icon layui-icon-delete"></i>删除</a>
                    </div>
                </script>

            </div>
        </div>
    </div>
</div>
{/block}


{block name="js"}
<script>
    layui.use(['table', 'layer', 'form'], function() {
        var table = layui.table,
            layer = layui.layer,
            form = layui.form,
            $ = layui.jquery;

        table.render({
            elem: '#dataTable',
            url: "{:url()}",
            title: '数据表',
            size: 'lg',
            limit: 20,
            cols: [
                [
                    {field: 'left',		title:'操作',		width:160,		align:'center',	toolbar:'#barDemo'},
                    {field: 'status',	title:'状态',		width:120,		align:'center',		templet:'#status',	sort:true},
                    {field: 'rukou',	title:'入口网址',		width:240,		align:'center',	templet:'#rukou'},
                    {field: 'title',	title:'群标题',		minWidth:200},
                    {field: 'name',		title:'主播昵称',		width:120,		align:'center'},
                    {field: 'vpic',		title:'视频封面',		width:140,		align:'center',	templet:'#vpic'},
                    {field: 'view',		title:'访问量',		width:100,		align:'center',	sort:true},
                ]
            ],
            page: true
        });

    });
</script>
{/block}


<!--
`tag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主播昵称',
`age` int(3) UNSIGNED NOT NULL DEFAULT 19 COMMENT '年龄',
`cover` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
`vsrc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '视频地址',
`vpic` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '视频封面',

`back_jump_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '返回广告网址',
`share_end_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '分享结束后类型',
`share_end_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分享结束后跳转网址',
`share_end_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分享结束后弹出图片',

`view` int(8) UNSIGNED NOT NULL DEFAULT 0 COMMENT '访问量',
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT 2 COMMENT '状态, 1:启用',
`create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
-->